

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/egg.png">
  <link rel="icon" href="/img/egg.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="十一的蛋炒饭">
  <meta name="keywords" content="">
  
    <meta name="description" content="运行环境  win11 vscode 1.67.0  1. win11和远程服务器进行ssh连接 这里，笔者要连接的远程服务器已映射为 “uni1”   2. 在VSCode 安装 Remote - SSH 拓展  3. 配置拓展，添加远程服务器          接下来以 ssh 用户名@连接地址 的格式 输入远程连接的命令，比如： 1ssh uni@uni1    选择ssh的配置文件，选第一">
<meta property="og:type" content="article">
<meta property="og:title" content="备忘录3 | VSCode 使用拓展操作远程服务器文件">
<meta property="og:url" content="http://example.com/2022/05/12/%E5%A4%87%E5%BF%98%E5%BD%953-VSCode-%E4%BD%BF%E7%94%A8%E6%8B%93%E5%B1%95%E6%93%8D%E4%BD%9C%E8%BF%9C%E7%A8%8B%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%96%87%E4%BB%B6/index.html">
<meta property="og:site_name" content="十一的蛋炒饭的博客">
<meta property="og:description" content="运行环境  win11 vscode 1.67.0  1. win11和远程服务器进行ssh连接 这里，笔者要连接的远程服务器已映射为 “uni1”   2. 在VSCode 安装 Remote - SSH 拓展  3. 配置拓展，添加远程服务器          接下来以 ssh 用户名@连接地址 的格式 输入远程连接的命令，比如： 1ssh uni@uni1    选择ssh的配置文件，选第一">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072356562.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072356694.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072356362.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072357521.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072357343.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072357529.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358457.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358235.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358750.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358360.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358042.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072359707.png">
<meta property="article:published_time" content="2022-05-12T15:59:00.000Z">
<meta property="article:modified_time" content="2024-03-07T16:00:12.676Z">
<meta property="article:author" content="十一的蛋炒饭">
<meta property="article:tag" content="vscode">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072356562.png">
  
  
  
  <title>备忘录3 | VSCode 使用拓展操作远程服务器文件 - 十一的蛋炒饭的博客</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.7","typing":{"enable":true,"typeSpeed":60,"cursorChar":"","loop":false,"scope":["home"]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":"§"},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":{"measurement_id":null},"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  


  
<meta name="generator" content="Hexo 7.1.1"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>十一的蛋炒饭 的博客</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/" target="_self">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/" target="_self">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/" target="_self">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/" target="_self">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/" target="_self">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/win7.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle">备忘录3 | VSCode 使用拓展操作远程服务器文件</span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2022-05-12 23:59" pubdate>
          2022年5月12日 晚上
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          304 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          3 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar category-bar" style="margin-right: -1rem">
    





<div class="category-list">
  
  
    
    
    
    <div class="category row nomargin-x">
      <a class="category-item 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="备忘录"
        id="heading-7e66eb1c601c67c29ee37898ef98dac3" role="tab" data-toggle="collapse" href="#collapse-7e66eb1c601c67c29ee37898ef98dac3"
        aria-expanded="true"
      >
        备忘录
        <span class="list-group-count">(4)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-7e66eb1c601c67c29ee37898ef98dac3"
           role="tabpanel" aria-labelledby="heading-7e66eb1c601c67c29ee37898ef98dac3">
        
        
          
  <div class="category-post-list">
    
    
      
      
        <a href="/2022/05/12/%E5%A4%87%E5%BF%98%E5%BD%953-VSCode-%E4%BD%BF%E7%94%A8%E6%8B%93%E5%B1%95%E6%93%8D%E4%BD%9C%E8%BF%9C%E7%A8%8B%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%96%87%E4%BB%B6/" title="备忘录3 | VSCode 使用拓展操作远程服务器文件"
           class="list-group-item list-group-item-action
           active">
          <span class="category-post">备忘录3 | VSCode 使用拓展操作远程服务器文件</span>
        </a>
      
    
      
      
        <a href="/2022/05/15/%E5%A4%87%E5%BF%98%E5%BD%951-%E4%BD%BF%E7%94%A8anaconda3%E5%AE%89%E8%A3%85%E6%94%AF%E6%8C%81python%E6%93%8D%E4%BD%9Cneo4j%E7%9A%84py2neo%E5%BA%93/" title="备忘录1 | 使用anaconda3安装支持python操作neo4j的py2neo库"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">备忘录1 | 使用anaconda3安装支持python操作neo4j的py2neo库</span>
        </a>
      
    
      
      
        <a href="/2022/05/15/%E5%A4%87%E5%BF%98%E5%BD%952-win11%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AENeo4J-%E5%9B%BE%E5%BD%A2%E6%95%B0%E6%8D%AE%E5%BA%93/" title="备忘录2 |  win11安装配置Neo4J 图形数据库"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">备忘录2 |  win11安装配置Neo4J 图形数据库</span>
        </a>
      
    
      
      
        <a href="/2024/03/19/%E5%A4%87%E5%BF%98%E5%BD%954-VSCode-%E7%BC%96%E8%BE%91%E5%99%A8%E5%BF%AB%E6%8D%B7%E9%94%AE/" title="备忘录4 | VSCode 编辑器快捷键"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">备忘录4 | VSCode 编辑器快捷键</span>
        </a>
      
    
  </div>

        
      </div>
    </div>
  
</div>


  </aside>


    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">备忘录3 | VSCode 使用拓展操作远程服务器文件</h1>
            
              <p id="updated-time" class="note note-info" style="display: none">
                
                  
                    本文最后更新于 2024-03-08T00:00:12+08:00
                  
                  

                
              </p>
            
            
              <div class="markdown-body">
                
                <h1 id="运行环境"><a href="#运行环境" class="headerlink" title="运行环境"></a>运行环境</h1><hr>
<ul>
<li>win11</li>
<li>vscode 1.67.0</li>
</ul>
<h1 id="1-win11和远程服务器进行ssh连接"><a href="#1-win11和远程服务器进行ssh连接" class="headerlink" title="1. win11和远程服务器进行ssh连接"></a>1. win11和远程服务器进行ssh连接</h1><hr>
<p>这里，笔者要连接的远程服务器已映射为 “uni1”</p>
<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072356562.png" srcset="/img/loading.gif" lazyload alt="image-20240307235623492" style="zoom: 50%;" />

<h1 id="2-在VSCode-安装-Remote-SSH-拓展"><a href="#2-在VSCode-安装-Remote-SSH-拓展" class="headerlink" title="2. 在VSCode 安装 Remote - SSH 拓展"></a>2. 在VSCode 安装 Remote - SSH 拓展</h1><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072356694.png" srcset="/img/loading.gif" lazyload alt="image-20240307235639640" style="zoom: 50%;" />

<h1 id="3-配置拓展，添加远程服务器"><a href="#3-配置拓展，添加远程服务器" class="headerlink" title="3. 配置拓展，添加远程服务器"></a>3. 配置拓展，添加远程服务器</h1><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072356362.png" srcset="/img/loading.gif" lazyload alt="image-20240307235655292" style="zoom:50%;" />





<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072357521.png" srcset="/img/loading.gif" lazyload alt="image-20240307235706484" style="zoom:50%;" />



<p>接下来以 ssh 用户名@连接地址 的格式 输入远程连接的命令，比如：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">ssh uni@uni1<br></code></pre></td></tr></table></figure>

<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072357343.png" srcset="/img/loading.gif" lazyload alt="image-20240307235720310" style="zoom:50%;" />

<p>选择ssh的配置文件，选第一个就行</p>
<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072357529.png" srcset="/img/loading.gif" lazyload alt="image-20240307235733492" style="zoom: 50%;" />

<p>再次点击拓展，连接刚刚添加的远程服务器</p>
<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358457.png" srcset="/img/loading.gif" lazyload alt="image-20240307235802361" style="zoom:50%;" />

<p>接下来会弹出一个新的窗口，首先选择当前远程服务器的系统：笔者是Linux </p>
<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358235.png" srcset="/img/loading.gif" lazyload alt="image-20240307235819158" style="zoom:50%;" />

<p>连接成功后的新窗口</p>
<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358750.png" srcset="/img/loading.gif" lazyload alt="image-20240307235829684" style="zoom:50%;" />

<p>选择要访问的远程服务器目录</p>
<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358360.png" srcset="/img/loading.gif" lazyload alt="image-20240307235839295" style="zoom:50%;" />

<p>然后神奇的一幕就发生了，远程服务器的文件全部出现在了VSCode的窗口！</p>
<img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072358042.png" srcset="/img/loading.gif" lazyload alt="image-20240307235850976" style="zoom:50%;" />

<h1 id="4-测试拓展插件的强大功能"><a href="#4-测试拓展插件的强大功能" class="headerlink" title="4. 测试拓展插件的强大功能"></a>4. 测试拓展插件的强大功能</h1><p>笔者亲测，使用拓展后，操作远程服务器的文件跟操作本机文件一模一样，Ctrl+S保存就会自动修改</p>
<p><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403072359707.png" srcset="/img/loading.gif" lazyload alt="image-20240307235903646"></p>
<p>如果连 Ctrl + S 都懒得按的话，可以选择 Vscode 的 文件 -&gt; 自动保存，这样就是同步修改远程服务器文件内容了。</p>
<p>至此，VSCode 操作远程服务器文件测试完毕。</p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E5%A4%87%E5%BF%98%E5%BD%95/" class="category-chain-item">备忘录</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/vscode/" class="print-no-link">#vscode</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>备忘录3 | VSCode 使用拓展操作远程服务器文件</div>
      <div>http://example.com/2022/05/12/备忘录3-VSCode-使用拓展操作远程服务器文件/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>十一的蛋炒饭</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2022年5月12日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2022/05/15/%E5%A4%87%E5%BF%98%E5%BD%951-%E4%BD%BF%E7%94%A8anaconda3%E5%AE%89%E8%A3%85%E6%94%AF%E6%8C%81python%E6%93%8D%E4%BD%9Cneo4j%E7%9A%84py2neo%E5%BA%93/" title="备忘录1 | 使用anaconda3安装支持python操作neo4j的py2neo库">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">备忘录1 | 使用anaconda3安装支持python操作neo4j的py2neo库</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2022/05/12/BUG%E8%AE%B0%E5%BD%957-%E4%BD%BF%E7%94%A8-Bootstrap4-%E6%97%B6%EF%BC%8C%E5%AF%BC%E8%88%AA%E6%A0%8F%E8%80%81%E6%98%AF%E8%87%AA%E5%8A%A8%E6%8A%98%E5%8F%A0/" title="BUG记录7 | 使用 Bootstrap4 时，导航栏老是自动折叠">
                        <span class="hidden-mobile">BUG记录7 | 使用 Bootstrap4 时，导航栏老是自动折叠</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>博客网站基于Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>主题Fluid</span></a> 
    </div>
  
  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.4/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>





  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  var relativeDate = function() {
    var updatedTime = document.getElementById('updated-time');
    if (updatedTime) {
      var text = updatedTime.textContent;
      var reg = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|[+-]\d{2}:\d{2})/;
      var matchs = text.match(reg);
      if (matchs) {
        var relativeTime = moment(matchs[0]).fromNow();
        updatedTime.textContent = text.replace(reg, relativeTime);
      }
      updatedTime.style.display = '';
    }
  };
  Fluid.utils.createScript('https://lib.baomitu.com/moment.js/2.29.4/moment.min.js', function() {
    if (!'zh-cn'.startsWith('en')) {
      Fluid.utils.createScript('https://lib.baomitu.com/moment.js/2.29.4/locale/zh-cn.min.js', function() {
        relativeDate();
      });
    } else {
      relativeDate();
    }
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.20.1/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
